const initialState = {
  // 基本信息
  user: {},
  profile: {},
}

export default function profile(state = initialState, action) {
  const { type, payload } = action
  switch (type) {
    case 'profile_setUserInfo':
      return { ...state, user: { ...payload } }
    case 'profile_setUserProfile':
      return { ...state, profile: { ...payload } }
    default:
      return state
  }
}
